package com.adxon.servlet;

import com.adxon.Uri;
import com.adxon.cookie.Station;
import com.adxon.data.Item;
import com.adxon.data.ItemSet;
import com.adxon.data.Link;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.*;

@SuppressWarnings("serial")
public class RecycleBinServlet extends ServletBase{
	public void doGet(HttpServletRequest req,HttpServletResponse resp)
			throws IOException,ServletException{
		System.out.println("RecycleBinServlet: "+req.getRequestURI());
		Uri n=new Uri(req);
		System.out.println("key="+n+", path="+n.getPath()+", id="+
				n.getId()+", type="+n.getType()+", ext="+
				n.getExtension()+", tags="+n.getTags());
		String g=n.getTags();
		Item u=Station.getCurrentUser(req);
		Item s=new Link();
		s.setKind();
		s.setStarer(u);
		s.setRate(100);
		s.setTags(g);
		req.setAttribute("List",new ItemSet(s));
		setAttributes(req,"Recycle bin");
		forward("recyclebin.jsp",req,resp);
	}
}